/*******************************************************************************
 * This file is part of the EEG-database project
 * 
 *   ==========================================
 *  
 *   Copyright (C) 2013 by University of West Bohemia (http://www.zcu.cz/en/)
 *  
 *  ***********************************************************************************************************************
 *  
 *   Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 *   the License. You may obtain a copy of the License at
 *  
 *       http://www.apache.org/licenses/LICENSE-2.0
 *  
 *   Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 *   an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 *   specific language governing permissions and limitations under the License.
 *  
 *  ***********************************************************************************************************************
 *  
 *   ServiceResult.java, 2013/10/02 00:01 Jakub Rinkes
 ******************************************************************************/
package cz.zcu.kiv.eegdatabase.data.pojo;

// Generated 2.12.2013 0:56:28 by Hibernate Tools 3.4.0.CR1

import java.sql.Blob;
import org.hibernate.annotations.GenericGenerator;
import thewebsemantic.annotations.Ignore;

import javax.persistence.*;

/**
 * ServiceResult generated by hbm2java
 */
@Entity
@Table(name = "SERVICE_RESULT")
public class ServiceResult implements java.io.Serializable {

	private int serviceResultId;
	private Person owner;
	private Blob content;
	private String filename;
	private String title;
	private String status;

	public ServiceResult() {
	}

	public ServiceResult(Person owner, String title, String status) {
		this.owner = owner;
		this.title = title;
		this.status = status;
	}

	public ServiceResult(Person owner, Blob content, String filename,
			String title, String status) {
		this.owner = owner;
		this.content = content;
		this.filename = filename;
		this.title = title;
		this.status = status;
	}

	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "RESULT_ID", nullable = false, precision = 22, scale = 0)
	public int getServiceResultId() {
		return this.serviceResultId;
	}

	public void setServiceResultId(int serviceResultId) {
		this.serviceResultId = serviceResultId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PERSON_ID", nullable = false)
	public Person getOwner() {
		return this.owner;
	}

	public void setOwner(Person owner) {
		this.owner = owner;
	}

	@Column(name = "CONTENT")
    @Basic(fetch=FetchType.LAZY)
    @Lob
	@Ignore
	public Blob getContent() {
		return this.content;
	}

	public void setContent(Blob content) {
		this.content = content;
	}

	@Column(name = "FILENAME", length = 80)
	public String getFilename() {
		return this.filename;
	}

	public void setFilename(String filename) {
		this.filename = filename;
	}

	@Column(name = "TITLE", nullable = false, length = 80)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "STATUS", nullable = false, length = 20)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

}
